Driver
public abstract class Driver
Method Summary | |
---|---|
abstract bool | has(string name) 判断缓存是否存在 |
abstract mixed | get(string name, mixed default) 读取缓存 |
abstract boolean | set(string name, mixed value, int expire) 写入缓存 |
abstract false|int | inc(string name, int step) 自增缓存(针对数值缓存) |
abstract false|int | dec(string name, int step) 自减缓存(针对数值缓存) |
abstract boolean | rm(string name) 删除缓存 |
abstract boolean | clear(string tag) 清除缓存 |
protected string | getCacheKey(string name) 获取实际的缓存标识 |
mixed | pull(string name) 读取缓存并删除 |
$this | tag(string name, string|array keys, bool overlay) 缓存标签 |
protected void | setTagItem(string name) 更新标签 |
protected array | getTagItem(string tag) 获取标签包含的缓存标识 |
object | handler() 返回句柄对象,可执行其它高级方法 |
public abstract bool has(string name)
判断缓存是否存在
public abstract mixed get(string name, mixed default)
读取缓存
public abstract boolean set(string name, mixed value, int expire)
写入缓存
public abstract false|int inc(string name, int step)
自增缓存(针对数值缓存)
public abstract false|int dec(string name, int step)
自减缓存(针对数值缓存)
public abstract boolean rm(string name)
删除缓存
public abstract boolean clear(string tag)
清除缓存
protected string getCacheKey(string name)
获取实际的缓存标识
public mixed pull(string name)
读取缓存并删除
public $this tag(string name, string|array keys, bool overlay)
缓存标签
protected void setTagItem(string name)
更新标签
protected array getTagItem(string tag)
获取标签包含的缓存标识
public object handler()
返回句柄对象,可执行其它高级方法
缓存基础类